﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using FreeSql.DataAnnotations;

using tcm.entity.System;

namespace tcm.entity
{
    [Table(Name = "tcm_sys_menu")]
    public class SysMenu : BaseEntity
    {

        /// <summary>
        /// 父级节点id
        /// </summary>
        public long? parent_id { get; set; }

        /// <summary>
        /// 菜单名称 
        /// </summary>
        public string menu_name { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string menu_icon { get; set; }

        /// <summary>
        /// 菜单url
        /// </summary>
        public string menu_url { get; set; }

        /// <summary>
        /// 组件路径
        /// </summary>
        public string component { get; set; }
       
        /// <summary>
        /// 排序
        /// </summary>
        public int? menu_sort { get; set; }

        /// <summary>
        /// 菜单类型(1目录 2页面 3按钮)
        /// </summary>

        public int menu_type { get; set; }

        /// <summary>
        /// 菜单状态(0禁用 1启用)
        /// </summary>
        public int menu_status { get; set; }

        /// <summary>
        /// 菜单权限标识
        /// </summary>
        public string authorize { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }

        /// <summary>
        /// 父级菜单名称
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public string rarent_name { get; set; }

        /// <summary>
        /// 子菜单
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore = true)]
        public List<SysMenu> children { get; set; } = new List<SysMenu>();
    }
}
